using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_LogicPointMap : EntityTypeConfiguration<FMS_LogicPoint>
	{
		public FMS_LogicPointMap()
		{
			// Primary Key
			this.HasKey(t => t.Id);

			// Properties
			this.Property(t => t.LogicPointName)
				.HasMaxLength(100);
				
			this.Property(t => t.ObjectId)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("FMS_LogicPoint");
			this.Property(t => t.Id).HasColumnName("Id");
			this.Property(t => t.LogicPointName).HasColumnName("LogicPointName");
			this.Property(t => t.BizOrderType).HasColumnName("BizOrderType");
			this.Property(t => t.ObjectId).HasColumnName("ObjectId");
			this.Property(t => t.SystemId).HasColumnName("SystemId");
		}
	}
}

